function a() {
    let a1 = 'a1'
    this.a2 = 'a2'
}
a.prototype.fn1 = function () {
    console.log('a--fn1')
}

function b() {
    a.call(this)
}

b.prototype = new a()

let b2 = new b()

b2.fn1()
console.log(b.prototype.__proto__ === a.prototype)
console.log(b2.a2)
console.log(a.a1)